/* ----------------------------基础动画样式------------------------------------
  主要复制elementUI的样式，主要替换了时长控制变量
   @link https://element.eleme.cn/#/zh-CN/component/transition#collapse-zhan-kai-zhe-die
*/
$--fade-linear-transition: opacity $anim-duration-base linear;
$--md-fade-transition:
  transform $anim-duration-slow $anim-time-fn-easing,
  opacity $anim-duration-slow $anim-time-fn-easing;

/* fade 淡入淡出 Start */
.fade-in-linear-enter-active,
.fade-in-linear-leave-active {
  transition: $--fade-linear-transition;
}

.fade-in-linear-enter,
.fade-in-linear-leave,
.fade-in-linear-leave-active {
  opacity: 0;
}

.el-fade-in-linear-enter-active,
.el-fade-in-linear-leave-active {
  transition: $--fade-linear-transition;
}

.el-fade-in-linear-enter,
.el-fade-in-linear-leave,
.el-fade-in-linear-leave-active {
  opacity: 0;
}

.el-fade-in-enter-active,
.el-fade-in-leave-active {
  transition: all $anim-duration-slow cubic-bezier(0.55, 0, 0.1, 1);
}

.el-fade-in-enter,
.el-fade-in-leave-active {
  opacity: 0;
}

/* fade 淡入淡出 End */

/* zoom 缩放 Start */
.el-zoom-in-center-enter-active,
.el-zoom-in-center-leave-active {
  transition: all $anim-duration-slow cubic-bezier(0.55, 0, 0.1, 1);
}

.el-zoom-in-center-enter,
.el-zoom-in-center-leave-active {
  opacity: 0;
  transform: scaleX(0);
}

.el-zoom-in-top-enter-active,
.el-zoom-in-top-leave-active {
  opacity: 1;
  transition: $--md-fade-transition;
  transform: scaleY(1);
  transform-origin: center top;
}

.el-zoom-in-top-enter,
.el-zoom-in-top-leave-active {
  opacity: 0;
  transform: scaleY(0);
}

.el-zoom-in-bottom-enter-active,
.el-zoom-in-bottom-leave-active {
  opacity: 1;
  transition: $--md-fade-transition;
  transform: scaleY(1);
  transform-origin: center bottom;
}

.el-zoom-in-bottom-enter,
.el-zoom-in-bottom-leave-active {
  opacity: 0;
  transform: scaleY(0);
}

.el-zoom-in-left-enter-active,
.el-zoom-in-left-leave-active {
  opacity: 1;
  transition: $--md-fade-transition;
  transform: scale(1, 1);
  transform-origin: top left;
}

.el-zoom-in-left-enter,
.el-zoom-in-left-leave-active {
  opacity: 0;
  transform: scale(0.45, 0.45);
}

/* zoom 缩放 End */

/* collapse 展开折叠 Start */
.collapse-transition {
  transition:
    $anim-duration-slow height ease-in-out,
    $anim-duration-slow padding-top ease-in-out,
    $anim-duration-slow padding-bottom ease-in-out;
}

.horizontal-collapse-transition {
  transition:
    $anim-duration-slow width ease-in-out,
    $anim-duration-slow padding-left ease-in-out,
    $anim-duration-slow padding-right ease-in-out;
}

/* collapse 展开折叠 End */

.el-list-enter-active,
.el-list-leave-active {
  transition: all 1s;
}

.el-list-enter,
.el-list-leave-active {
  opacity: 0;
  transform: translateY(-30px);
}

.el-opacity-transition {
  transition: opacity $anim-duration-slow cubic-bezier(0.55, 0, 0.1, 1);
}

// 旋转动画
.loading {
  animation: rotating 2s linear infinite;
}

@keyframes rotating {
  0% {
    transform: rotateZ(0);
  }

  100% {
    transform: rotateZ(360deg);
  }
}
